package lz.edittext;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {
ListView lv;
List<String> list = new ArrayList<>();
EditText et;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        for (int i = 0; i < 30; i++) {
            list.add("第"+ i + "条数据");
        }

        lv = findViewById(R.id.lv);

        et  = findViewById(R.id.et);
        lv.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,list));

    }
}
